package main

import (
	"net/http"
	"fmt"
)

/*
  go run $GOROOT/src/crypto/tls/generate_cert.go --host localhost
*/



func handler(w http.ResponseWriter, r *http.Request) {
	fmt.Fprintf(w,"这是一个https请求"+r.FormValue("id"))

}

func main() {
	http.HandleFunc("/", handler)
	err :=http.ListenAndServeTLS(":8081", "cert.pem","key.pem", nil)
	fmt.Println(err)
}

